//
//  CustomClearBtTableViewCell.m
//  ChunLaiZhuangClient
//
//  Created by zouzhisheng on 16/3/13.
//  Copyright © 2016年 CLZ. All rights reserved.
//

#import "CustomClearBtTableViewCell.h"
#import "SearchViewController.h"
#import "QLKDataBaseManager.h"
@implementation CustomClearBtTableViewCell

- (void)awakeFromNib {
    // Initialization code
    self.clearBt.layer.cornerRadius=6;
    self.clearBt.layer.borderColor=[UIColor colorWithHexString:@"f45d5d"].CGColor;
    self.clearBt.layer.borderWidth=1;
    self.clearBt.clipsToBounds=YES;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (IBAction)clearAction:(id)sender {
    [[QLKDataBaseManager shareDataBaseManager] deleteAllHistoryData];
    SearchViewController *vc=(SearchViewController*)[CustomClearBtTableViewCell viewController:self];
    [vc loadHistoryData];
}
@end
